<extend name="Layout/ins_page" />
<block name="content">
{:W('PageHeader/adv_search',array('name'=>'信息搜索','search'=>'M'))}
<form method="post" name="form_adv_search" id="form_adv_search">
	<div class="adv_search panel panel-default  hidden"  id="adv_search">
		<div class="panel-heading">
			<div class="row">
				<h4 class="col-xs-6">高级搜索</h4>
				<div class="col-xs-6 text-right">
					<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
					<a  class="btn btn-sm " onclick="close_adv_search();">关闭</a>
				</div>
			</div>
		</div>
		<div class="panel-body">
			
			<div class="form-group col-sm-6">
				<label class="col-sm-4 control-label" for="be_create_time">添加时间：</label>
				<div class="col-sm-8">
					<div class="input-daterange input-group" >
					    <input type="text" class="input-sm form-control text-center input-date" name="be_create_time" readonly="readonly"/>
						<span class="input-group-addon">-</span>
						<input type="text" class="input-sm form-control text-center input-date" name="en_create_time" readonly="readonly"/>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>
<div class="ul_table message-container ul_table_responsive">
	<ul>
		<li class="thead">
			<div class="pull-left">
				<span class="col-12 text-center">请假类型</span>
				<span class="col-16 text-center">开始时间</span>	
				<span class="col-16 text-center">结束时间</span>
				<span class="col-10 text-center">总时(小时)</span>
				<span class="col-10 text-center">扣除工资(天)</span>
				<span class="col-10 text-center">状态</span>
				<span class="col-16 text-center">提交时间</span>
				
								
			</div>
			<div class="pull-right">
				<span class="col-6 text-center">操作</span>
				

			</div>
			<div class="auto autocut">
				
			</div>
		</li>
		<empty name="list">
			<li class="no-data">
				没找到数据
			</li>
			<else/>
			<form method="post" action="" name="form_data" id="form_data">
			<?php foreach($list as $item){?>
			<li class="tbody ">
						<div class="pull-left">
							<span class="col-12 text-center autocut"><?php echo $typelist[$item['type']];?></span>
							<span class="col-16 text-center"><?php echo date('Y-m-d H:i:s',$item['start_time'])?></span>
							<span class="col-16 text-center"><?php echo date('Y-m-d H:i:s',$item['end_time'])?></span>
							<span class="col-10 text-center"><?php echo $item['count_time_h'] ?></span>
							<span class="col-10 text-center"><?php echo $item['deductions_day'] ?></span>
							<span class="col-10 text-center">
							 <?php 
										if($item['step']==0){
											echo  "<b style='color:red'>被否决</b>";
										}else 
										if($item['step']<40){
											echo "<b style='color:black'>待审批</b>";
										}else{
											echo  "<b style='color:green'>审批通过</b>";
											}
									?>
							
							</span>
							
							<span class="col-16 text-center"><?php echo date('Y-m-d H:i:s',$item['create_time'])?></span>
						</div>
					<div class="pull-right">
						<span class="col-6 text-center "><a href="index.php?m=&c=self_service&a=editleave&id=<?php echo $item['id'] ?>">编辑</a></span>
						
						
					</div>
						
					</li>
			
			<?php }?>
			
			</form>
			<div class="pagination">
				{$page}
			</div>
		</empty>
	</ul>
</div>
</block>
<block name="js">


<script>
	$(document).ready(function() {
		set_return_url();
	}); 
	
	$(document).ready(function() {
		$('.input-date').datetimepicker({
			format : 'YYYY-MM-DD',
			locale : 'zh-cn',
			ignoreReadonly : true,
			widgetPositioning : {
				horizontal : 'auto',
				vertical : 'bottom'
			},
		});


		});
</script>
</block>